home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / ltxconst.zip / JEEP.STY (.txt) < prev    next >
LaTeX Document  |  1980-01-01  |  12KB  |  249 lines

  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. % jeep.sty, February  3, 1989
  3. % G. W. Stewart
  4. % Department of Computer Science
  5. % University of Maryland
  6. % College Park, MD 20784
  7. % stewart@thales.umd.edu
  8. % This is a personal customization of the LaTeX style files
  9. % article (4/16/88) and report (5/26/88).  The changes are
  10. % described more fully in the document jeep.tex.  Briefly
  11. % the style
  12. %    1. Changes the default page sizes to reflect the fact
  13. %       that most output will be on 8.5 x 11 inch paper.
  14. %    2. Adds commands that allow the casual LaTeX to change
  15. %       the formats of chapter, section, and theorem heads.
  16. %    3. Adds commands to number equations and theorems within
  17. %       sections or subsections.
  18. %    4. Makes Lance Berc's three part headers and footers the
  19. %       default page style.  Adds a macro to underline the
  20. %       header.
  21. %    5. Changes the default numbering of enumerate to arabic.
  22. %       Adds a new enumeration environment in which the items
  23. %       are close together.
  24. %    6. Adds a command to produce a compact table of contents.
  25. %    7. Adds commands to produce symbolic footnote marks and
  26. %       equation labels.
  27. % Change the default page sizes.
  28. \setlength{\topmargin}{.25in}
  29. \setlength{\textheight}{7.5in}
  30. \setlength{\oddsidemargin}{.375in}
  31. \setlength{\evensidemargin}{.375in}
  32. \setlength{\textwidth}{5.75in}
  33. % Define the command \mychapter{<head1>}{<head2>}.  <head1>
  34. % is the text to put in the chapter head if there is a
  35. % chapter number; <head2>, if not.
  36. \def\@chapapp{Chapter}
  37. \def\chapapp{\@chapapp}
  38. \def\mychapter#1#2{
  39.    \def\@chaphead##1{#1}
  40.    \def\@schaphead##1{#2}
  41. \def\@makechapterhead#1{ \vspace*{\chaptopsep} { \parindent 0pt \raggedright
  42.  \ifnum \c@secnumdepth >\m@ne \@chaphead{#1} \else \@schaphead{#1} \fi
  43.  \par \nobreak \vskip \chapaftersep } }
  44. \def\@makeschapterhead#1{ \vspace*{\chaptopsep} { \parindent 0pt \raggedright
  45.  \@schaphead{#1}\par
  46.  \nobreak \vskip \chapaftersep } }
  47. % \chaptopsep is the space between the top of the text page and the
  48. % chapter head.  \chapaftersep is the space between the chapter
  49. % head and the text.
  50. \newlength{\chaptopsep}
  51. \setlength{\chaptopsep}{.5in}
  52. \newlength{\chapaftersep}
  53. \setlength{\chapaftersep}{.5in}
  54. % Default chapter headings.
  55. \mychapter{\LARGE \sc \thechapter. #1}{\LARGE \sc #1}
  56. % Define the command \mysection{<sec>}{<style>}{<prefix>}.
  57. % <sec> is the section level--section, subsection, etc.  <style>
  58. % is the style in which the section head is to be set; e.g.,
  59. % \large\bf.  <prefix> is what proceeds the head text, usually
  60. % \the<sec> followed by some putctuation.
  61. \def\@startsection#1#2#3#4#5#6{\if@noskipsec \leavevmode \fi
  62.    \par \@tempskipa #4\relax
  63.    \@afterindenttrue
  64.    \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \@afterindentfalse\fi
  65.    \if@nobreak \everypar{}\else
  66.      \addpenalty{\@secpenalty}\addvspace{\@tempskipa}\fi \@ifstar
  67.      {\@ssect{#3}{#4}{#5}{#1}}{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
  68. \def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
  69.      \def\@svsec{}\else
  70.      \refstepcounter{#1}
  71.      \edef\@svsec{\expandafter\relax\csname @pre#1\endcsname}\fi
  72.      \@tempskipa #5\relax
  73.       \ifdim \@tempskipa>\z@
  74.         \begingroup \expandafter\relax\csname @#1style\endcsname\relax
  75.           \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}
  76.         \endgroup
  77.        \csname #1mark\endcsname{#7}\addcontentsline
  78.          {toc}{#1}{\ifnum #2>\c@secnumdepth \else
  79.                       \protect\numberline{\csname the#1\endcsname}\fi
  80.                     #7}\else
  81.         \def\@svsechd{
  82.             \expandafter\relax\csname @#1style\endcsname\relax
  83.             \hskip #3\@svsec #8\csname #1mark\endcsname
  84.                       {#7}\addcontentsline
  85.                            {toc}{#1}{\ifnum #2>\c@secnumdepth \else
  86.                              \protect\numberline{\csname the#1\endcsname}\fi
  87.                        #7}}\fi
  88.      \@xsect{#5}}
  89. \def\@ssect#1#2#3#4#5{\@tempskipa #3\relax
  90.    \ifdim \@tempskipa>\z@
  91.      \begingroup \expandafter\relax\csname @#4style\endcsname\relax
  92.      \@hangfrom{\hskip #1}{\interlinepenalty \@M #5\par}\endgroup
  93.    \else \def\@svsechd{#4\hskip #1\relax #5}\fi
  94.     \@xsect{#3}}
  95. \def\mysection#1#2#3{
  96.      \expandafter\def\csname @#1style\endcsname{#2}
  97.      \expandafter\def\csname @pre#1\endcsname{#3}
  98. % Default section heads.
  99. \mysection{section}{\large\bf}{\thesection.~}
  100. \mysection{subsection}{\normalsize\bf}{\thesubsection.~}
  101. \mysection{subsubsection}{\normalsize\bf}{\thesubsubsection.~}
  102. \mysection{paragraph}{\normalsize\bf}{\theparagraph.}
  103. \mysection{subparagraph}{\normalsize\bf}{\thesubparagraph.}
  104. % Redefine theorem environment macros to put \theoremcounterend
  105. % (default ".") after the "theorem" head.
  106. \def\@begintheorem#1#2{\sl \trivlist
  107.    \item[\hskip \labelsep{\bf #1\ #2\thmcounterend}]}
  108. \def\@opargbegintheorem#1#2#3{\sl \trivlist
  109.       \item[\hskip \labelsep{\bf #1\ #2\ (#3)\thmcounterend}]}
  110. \def\thmcounterend{.}
  111. % Define \numberbysection to number figures, table, equations, and
  112. % theorems within sections.  Similarly for \numberbysubsection.  Any
  113. % theorem-like environment numbered with theorem inherits this
  114. % numbering (however, be sure to define the.  theorem environment
  115. % before invoking \numberbysection or \numberbysubsection).
  116. \def\numberbysection{\renewcommand{\thesection}{\arabic{section}}
  117.                      \renewcommand{\theequation}{\thesection.\arabic{equation}}
  118.                      \@addtoreset{equation}{section}
  119.                      \renewcommand{\thetheorem}{\thesection.\arabic{theorem}}
  120.                      \@addtoreset{theorem}{section}
  121.                      \renewcommand{\thefigure}{\thesection.\arabic{figure}}
  122.                      \@addtoreset{figure}{section}
  123.                      \renewcommand{\thetable}{\thesection.\arabic{table}}
  124.                      \@addtoreset{table}{section}}
  125. \def\numberbysubsection{\renewcommand{\thesection}{\arabic{section}}
  126.               \renewcommand{\thesubsection}{\arabic{subsection}}
  127.               \renewcommand{\theequation}{\thesubsection.\arabic{equation}}
  128.               \@addtoreset{equation}{subsection}
  129.               \renewcommand{\thetheorem}{\thesubsection.\arabic{theorem}}
  130.               \@addtoreset{theorem}{subsection}
  131.               \renewcommand{\thefigure}{\thesubsection.\arabic{figure}}
  132.               \@addtoreset{figure}{subsection}
  133.               \renewcommand{\thetable}{\thesubsection.\arabic{table}}
  134.               \@addtoreset{table}{subsection}}
  135. \@definecounter{theorem}
  136. % Change the labels of enumerate and outline to arabic numbers.
  137. \def\labelenumi{\arabic{enumi}.}
  138. \def\theenumi{\arabic{enumi}}
  139. \def\labelenumii{\arabic{enumii}.}
  140. \def\theenumii{\arabic{enumii}}
  141. \def\p@enumii{\theenumi.}
  142. \def\labelenumiii{\arabic{enumiii}.}
  143. \def\theenumiii{\arabic{enumiii}}
  144. \def\p@enumiii{\theenumi.\theenumii.}
  145. \def\labelenumiv{\arabic{enumiv}.}
  146. \def\theenumiv{\arabic{enumiv}}
  147. \def\p@enumiv{\p@enumiii.\theenumiii}
  148. % Outline is a new list style--the same as enumerate with
  149. % less space between the items.
  150. \def\outline{\ifnum \@enumdepth >3 \@toodeep\else
  151.       \advance\@enumdepth \@ne
  152.       \edef\@enumctr{enum\romannumeral\the\@enumdepth}\list
  153.       {\csname label\@enumctr\endcsname}{\usecounter
  154.         {\@enumctr}\def\makelabel##1{\hss\llap{##1}}
  155.          \parsep \z@ \itemsep \z@
  156.          \ifnum \@enumdepth > 1 \topsep \z@ \fi}\fi}
  157. \let\endoutline =\endlist
  158. % Three part head and foot macros by
  159. % Lance Berc
  160. % Olivetti Research Center
  161. % 2882 Sand Hill Road
  162. % Menlo Park, California 94025
  163. % (415) 496-6200
  164. % lance@orc.olivetti.com
  165. \def\lhead#1{\gdef\@lhead{#1}} \def\lfoot#1{\gdef\@lfoot{#1}}
  166. \def\chead#1{\gdef\@chead{#1}} \def\cfoot#1{\gdef\@cfoot{#1}}
  167. \def\rhead#1{\gdef\@rhead{#1}} \def\rfoot#1{\gdef\@rfoot{#1}}
  168. \def\@lhead{} \def\@lfoot{}
  169. \def\@chead{} \def\@cfoot{}
  170. \def\@rhead{} \def\@rfoot{}
  171. \def\@threepart#1#2#3{\rlap{#1} \hfil {#2} \hfil \llap{#3}}
  172. \def\ps@threepartheadings
  173.     {
  174.     \def\@oddhead{\@threepart{\@lhead}{\@chead}{\@rhead}}
  175.     \def\@oddfoot{\@threepart{\@lfoot}{\@cfoot}{\@rfoot}}
  176.     \if@twoside
  177.     \def\@evenhead{\@threepart{\@rhead}{\@chead}{\@lhead}}
  178.     \def\@evenfoot{\@threepart{\@rfoot}{\@cfoot}{\@lfoot}}
  179.     \else
  180.     \def\@evenhead{\@thr